package com.java.zhuiyun.usertask.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @ClassName UserTask
 * @Description TODO
 * @Author xy
 * @Date 2023/10/16 13:50
 **/
@Getter
@Setter
@ToString
@TableName("user_task")
public class UserTask implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 玩家id
     */
    private Integer userid;

    /**
     * 任务id
     */
    private Integer taskid;

    /**
     * 任务进度值
     */
    private String progress;

    /**
     * 任务状态
     */
    private Integer completion;

    /**
     * 任务创建时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    /**
     * 任务更新时间
     */
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    /**
     * 删除标识（0 显示 1禁用）
     */
    @TableLogic(value = "0", delval = "1")
    private Boolean delFlag;
}
